home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMICUS14.ADF
/
Progs
/
PETrans
/
Petrans.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-01-28
|
820b
|
29 lines
/********************************************
* P E T R A N S - by James David Walley *
* Usage-- *
* petrans < oldfile > newfile *
********************************************/
#include <stdio.h>
main()
{
int c;
while ((c = getchar()) != EOF) {
if (c == 13) /* replacing CR with LF */
c = 10;
if (c >= 193 && c <= 218) /* "cleaning up" 2nd-order uppercase */
c -= 96;
if (c >= 65 && c <=90) /* converting PETACSII uppercase */
c += 32; /* to ASCII lowercase */
else
if (c >= 97 && c <= 122) /* converting PETASCII lowercase */
c -= 32; /* to ASCII uppercase */
putchar(c);
}
fclose(stdout);
}